import request from '@/utils/request'

// 运费模板列表
export function getCarriagesList() {
  return request({
    url: 'manager/carriages',
    method: 'get'
  })
}

// 新增/修改运费模板
export function addCarriagesList(data) {
  return request({
    url: 'manager/carriages',
    method: 'post',
    data
  })
}
// 删除运费模板

export function delCarriagesList(id) {
  return request({
    url: `/manager/carriages/${id}`,
    method: 'delete'
  })
}

// 获取树状机构信息
export function getManageTree() {
  return request({
    url: `/manager/business-hall/tree`
  })
}

// 获取机构详情
export function getManageDetail(id) {
  return request({
    url: `/manager/business-hall/${id}`
  })
}
// 根据机构查询快递员
export function getAgencyDetail(params) {
  return request({
    url: `/manager/business-hall/user/page`,
    params
  })
}

// 获取快递员详情
export function getCourierDetail(id) {
  return request({
    url: `/manager/business-hall/courier/{id}`
  })
}

// 编辑机构
export function editManage(data) {
  return request({
    url: `/manager/business-hall`,
    method: 'put',
    data
  })
}

// 获取业务范围
export function getBusinessScope(id, type) {
  return request({
    url: `/manager/business-hall/scope/${id}/${type}`
  })
}
